﻿using HZU.ZP.Data.Models;
using System;
using System.Collections.Generic;
using System.Text;

namespace HZU.ZP.Data.Interfaces
{
    public interface IApplyRecordDao
    {
        /// <summary>
        /// 添加职位申请记录
        /// </summary>
        /// <param name="applyRecord"></param>
        void Add(ApplyRecord applyRecord);
        /// <summary>
        /// 更新职位申请记录
        /// </summary>
        /// <param name="applyRecord"></param>
        void Update(ApplyRecord applyRecord);
        /// <summary>
        /// 根据条件获取职位申请记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ApplyRecord Get(int id);
        /// <summary>
        /// 根据条件获取职位申请记录
        /// </summary>
        /// <param name="applicantId"></param>
        /// <param name="positionId"></param>
        /// <returns></returns>
        ApplyRecord Get(int applicantId, int positionId);
        /// <summary>
        /// 根据条件获取职位申请记录
        /// </summary>
        /// <param name="companyId"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        ApplyRecord GetByComAndId(int companyId, int id);
        /// <summary>
        /// 根据条件获取职位申请列表
        /// </summary>
        /// <param name="applicantId"></param>
        /// <param name="processing"></param>
        /// <returns></returns>
        IList<ApplyRecord> GetByApplicant(int applicantId, int processing, int pageIndex);
        /// <summary>
        /// 根据条件获取职位申请列表
        /// </summary>
        /// <param name="companyId"></param>
        /// <param name="processing"></param>
        /// <returns></returns>
        IList<ApplyRecord> GetByCompany(int companyId, int processing, int pageIndex);
        int GetAppCount(int applicantId, int processing);
        int GetComCount(int companyId, int processing);
    }
}
